<?php
	session_start();
	require_once("../db_connect.php");

	$sub_category_id  = htmlspecialchars($_GET['sub_category_delete_id'],ENT_QUOTES,"UTF-8");

	$sql = "DELETE FROM sub_category WHERE sub_category_id = ?";
	$stmt = $db->prepare($sql);
	$ary = ($sub_category_id);

	$db->execute($stmt, $ary);     //UPDATE文を実行

	if (PEAR::isError($db)) {       //SQLの実行に失敗すればここでエラー文を出力
    	die($res->getMessage());
	}

	header("Location: manage_main_category_detail.php");
?>